<?php

/*
 * Fresns Control Panel (Standalone)
 * Copyright (C) 2021-Present 刘鑫
 * Released under the MIT License.
 */

namespace App\Plugins\FcpApi;

use App\Http\Center\Base\BasePlugin;
use App\Http\Center\Common\LogService;

class Plugin extends BasePlugin
{
    // 构造函数
    public function __construct()
    {
        $this->pluginConfig = new PluginConfig();
        $this->pluginCmdHandlerMap = PluginConfig::FRESNS_CMD_HANDLE_MAP;
    }

    // 获取错误码
    public function getCodeMap()
    {
        return PluginConfig::CODE_MAP;
    }

    // 默认处理
    protected function defaultHandler($input)
    {
        LogService::info('插件处理开始: ', $input);
        // todo
        $data = [
        ];

        LogService::info('插件处理完成: ', $input);
        // dd($data);
        return $this->pluginSuccess($data);
    }
}
